<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{#    <ul>#}
{#        {% for book in books reversed %}#}
{#            <li>{{ book }}</li>#}
{#        {% endfor %}#}
{#    </ul>#}
    <ul>
        {% for key,value in person.items %}
            <li>{{ key }}/{{ value }}</li>
        {% endfor %}
    </ul>
    <table>
        <thead>
            <tr>
                <td>序号</td>
                <td>书名</td>
                <td>作者</td>
                <td>价格</td>
            </tr>
        </thead>
        <tbody>
            {% for book in books %}
                {% if forloop.first %}
                    <tr style="background: red;">
                {% elif forloop.last %}
                    <tr style="background: pink;">
                {% else %}
                    <tr>
                {% endif %}
                    <td>{{ forloop.revcounter0 }}</td>
                    <td>{{ book.name }}</td>
                    <td>{{ book.author }}</td>
                    <td>{{ book.price }}</td>
                </tr>
                {% break %}
            {% endfor %}
        </tbody>
    </table>

    <ul>
        {% for comment in comments %}
            <li>{{ comment }}</li>
        {% empty %}
            <li>没有任何评论</li>
        {% endfor %}

    </ul>
</body>
</html>